<?php

/**
 * @author shuang
 * @date 2016-9-5 20:48:17
 */
use yii\helpers\Url;
use yii\helpers\ArrayHelper;

$this->registerCssFile("/js/ui-dialog.css");
$this->registerJsFile("/js/dialog-min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/upgrade.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJs('$.upgrade.init({rebateupurl:"' . Url::toRoute(["account/rebateup"]) . '",withdrawalurl:"' . Url::toRoute(["account/withdrawal"]) . '"});$.upgrade.withdrawal();$.upgrade.rebateup()');
echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["profile/info"]), "title" => "账户详情"]);
?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12 well ibox float-e-margins">
            <div class="ibox-title">账户详情</div>
            <div class="well-content ibox-content">
                <div class="control-group">
                    <label class="control-label">用户名</label>
                    <div class="controls">
                        <input name="username" type="text" id="username" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "username"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">账号余额</label>
                    <div class="controls">
                        <input name="yue" type="text" id="yue" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "amount"); ?>" />
                    </div>
                </div>
                <!--                <div class="control-group">
                                    <label class="control-label">返利金额</label>
                                    <div class="controls">
                                        <input name="bindmoney" type="text" id="bindmoney" disabled="disabled" class="span5" value="<?php //echo ArrayHelper::getValue($res, "rebate_amount");  ?>" />
                                    </div>
                                </div>-->
                <div class="control-group">
                    <label class="control-label">账户级别  <a style="margin-left: 10px; color:red;" href="<?php echo Url::toRoute(["grade/level"]) ?>">[升级]</a></label>
                    <div class="controls">
                        <input name="zhjb" type="text" id="zhjb" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "gradename"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">真实姓名</label>
                    <div class="controls">
                        <input name="truename" type="text" id="truename" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "truename"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">支付宝账户</label>
                    <div class="controls">
                        <input name="zfb" type="text" id="zfb" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "alipay"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">联系电话</label>
                    <div class="controls">
                        <input name="mobile" type="text" id="mobile" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "phone"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">QQ</label>
                    <div class="controls">
                        <input name="qq" type="text" id="qq" disabled="disabled" class="span5" value="<?php echo ArrayHelper::getValue($res, "qq"); ?>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">充值总额</label>
                    <div class="controls">
                        <input type="text" disabled="" id="chognzhi" value="<?php echo Yii::$app->formatter->asDecimal(ArrayHelper::getValue($res, "payamount"), 2); ?>" class="span5" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">推广码</label>
                    <div class="controls">
                        <input type="text" id="invitecode" value="<?php echo Yii::$app->formatter->asText(Yii::$app->user->identity->my_code); ?>" class="span5" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">推广注册链接</label>
                    <div class="controls">
                        <input type="text"  id="invitecodelink" value="<?php echo Url::toRoute(["site/signup","id"=>Yii::$app->formatter->asText(Yii::$app->user->identity->my_code)],true); ?>" class="span5" />
                        <br />推广的下级充值，2%提成立即到账。
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"></label>
                    <!--                    <div class="controls">
                                            <input type="button" class=" btn lightblue span3 withdrawal" value="提现返利金额(100元起)" />
                                            <input type="button"  class=" btn lightblue span3 rebateup"  value="将返利金额充值进账户"/>
                                        </div>-->
                </div>
            </div>
        </div>
    </div>
</div>